class Solution {
public:
    vector<int> findIndices(vector<int>& nums, int indexDifference, int valueDifference)
    {
        if (nums.size() == 1)
        {
            if (abs(0 - 0) >= indexDifference && abs(nums[0] - nums[0]) >= valueDifference)
                return { 0,0 };
            else
                return { -1,-1 };
        };
        vector<int> ans;
        int n = nums.size();
        for (int i = 0; i < n; i++)
        {
            for (int j = i + 1; j < n; j++)
            {
                if (abs(i - j) >= indexDifference && abs(nums[i] - nums[j]) >= valueDifference)

                {
                    ans.push_back(i);
                    ans.push_back(j);
                    return ans;
                }

            }
        }
        return { -1,-1 };
    }
};